//
//  KC_VC.m
//  Jade
//
//  Created by king on 16/4/7.
//  Copyright © 2016年 KC. All rights reserved.
//

#import "KC_VC.h"
#import "AppDelegate.h"

@interface KC_VC ()

@end

@implementation KC_VC

#pragma mark - LifeCycle

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.view.backgroundColor = COLOR_FOR_BG;
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.translatesAutoresizingMaskIntoConstraints = NO;
    self.navigationController.navigationBar.hidden = YES;
    self.KCNavView.backgroundColor = WHITE_COLOR;
    self.navigationHeight = 88;

}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}

-(UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

{
    
    [self.view layoutSubviews];

    if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {// 横屏
        KCLog(@"横屏");
    } else {//竖屏
        KCLog(@"竖");
    }
    
}

- (UIImageView *)KCNavView{
    
    if (!_KCNavView) {
        _KCNavView = [[UIImageView alloc]initWithFrame:CGRectMake(X_OFF_SET, Y_OFF_SET, SCREEN_WIDTH, NAV_HEIGHT)];
        _KCNavView.userInteractionEnabled = YES;
        [self.view addSubview:_KCNavView];
    }
    return _KCNavView;
    
}
- (UILabel *)KCTitleLable{
    
    if (!_KCTitleLable) {
        _KCTitleLable = [[UILabel alloc]initWithFrame:CGRectMake(SCALE_SIZE(2) - 130, self.navigationHeight - 35, 260, 30)];
        _KCTitleLable.font = SYSTEM_BOLD_FONT(FONTS_18);
        _KCTitleLable.textAlignment = NSTextAlignmentCenter;
        [self.KCNavView addSubview:_KCTitleLable];
    }
    return _KCTitleLable;
}

@end
